home *** CD-ROM | disk | FTP | other *** search
- '-- sets the fg/bg colors of a control
- Sub ColorSet (Ctl As Control)
-
- '-- load the form
- Load ColorSetForm
- ColorSetForm.FG.BackColor = Ctl.ForeColor
- ColorSetForm.BG.BackColor = Ctl.BackColor
-
- ColorSetForm.Show MODAL
-
- Ctl.ForeColor = ColorSetForm.FG.BackColor
- Ctl.BackColor = ColorSetForm.BG.BackColor
-
- Unload ColorSetForm
-
- End Sub
-
- Function GetBValue (rgbColor As Long) As Integer
-
- GetBValue = rgbColor And &HFF0000 \ &H10000
-
- End Function
-
- Function GetGValue (rgbColor As Long) As Integer
-
- GetGValue = Int(rgbColor And &HFF00& \ &H100&)
-
- End Function
-
- Function GetRValue (rgbColor As Long) As Integer
-
- GetRValue = rgbColor And &HFF&
-
- End Function
-
-